<template>
	<view class="reviews-main">
		<c-layout>
			<c-navigation-bar slot="head" :bgColor="true" title="Reviews">
			</c-navigation-bar>
			<view class="container-box">
				<u-subsection font-size="28" bg-color="#F8F8F8" :bold="false" active-color="#2934D0"
					inactive-color="#A5A5A5" :list="subsectionList" :current="1">
				</u-subsection>
				<view class="reviews-list-box">
					<reviewsCard :imgList="imageList" :data="item" v-for="item in commentList.filter((m,i)=>i<=1)">
					</reviewsCard>
				</view>
			</view>
			<notTabbar slot="footer">
				<view class="footer-handle">
					<view class="circle">
						<u-icon name="chat"></u-icon>
					</view>
					<view class="circle">
						<u-icon name="heart"></u-icon>
					</view>
					<u-button class="add">
						Add to cart
					</u-button>
					<u-button class="blue">
						Buy quickly
					</u-button>
				</view>
			</notTabbar>
		</c-layout>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 分段器
				subsectionList: [{
						name: 'All'
					},
					{
						name: 'Well reviews'
					},
					{
						name: 'Negative'
					}
				],
				// 
				commentList: [],
				imageList: [
					require('@/static/images/home/good-1.png'),
					require('static/images/home/good-2.png'),
					require('static/images/home/girl.png'),
					require('static/images/home/good-2.png'),
				],
			};
		},
		onLoad() {
			this.getProductAjax()
		},
		methods: {
			// 获取评论
			getProductAjax() {
				
			},
		}
	}
</script>

<style lang="scss" scoped>
	.reviews-main {
		.container-box{
			height: 100%;
			display: flex;
			flex-direction: column;
		}
		.nav-search {
			/deep/  .switch-svg {
				width: 82rpx !important;
			}
		}
		
		.reviews-card {
			margin-top: 32rpx;

			&:not(:last-child) {
				/deep/  .main {
					border-bottom: 2rpx solid #F2F3F5;
				}
			}
		}

		.footer-handle {
			padding: 0rpx 42rpx;
			height: 100%;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.circle {
				border-radius: 50%;
				width: 80rpx;
				height: 80rpx;
				background-color: #22287C;
				color: #fff;
				text-align: center;
				line-height: 80rpx;
				font-size: 36rpx;
			}

			>button {
				font-weight: normal;
				height: 86rpx;
				line-height: 86rpx;
				width: 217rpx;

				&.add:not(.button-hover) {
					background-color: #323755;
					color: #DEDEDE;
				}

				margin: 0;
				padding: 0;
				font-size: 32rpx;
			}
		}

		.reviews-list-box {
			flex: auto;
			height: 0;
			overflow: auto;
			padding-top: 26rpx;

			.reviews-card {
				margin: 30rpx 0;

				&:not(:last-child) {
					/deep/  .main {
						border-bottom: 2rpx solid #F2F3F5;
					}
				}
			}
		}
	}
</style>
